const mysql = require('mysql2')

const db = mysql.createConnection({
    host: '219.140.149.102',
    user: 'root',
    password: 'kz757996',
    port: '3306',
    database: 'xiaohe'
})

db.connect(err => {
    if (err) return console.log('数据库连接错误')
    console.log('数据库连接成功')
})
module.exports = db